package com.auz.datagenerator.connector.heuristiclink;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.util.List;

import javax.swing.JPanel;

/**
 * The panel used by the heuristic link
 * @author Aurelien Bonnel
 * @see com.auz.datagenerator.connector.heuristiclink.ValueHeuristicLink
 */
public class ValueHeuristicLinkPanel extends JPanel {

	/**
	 * Constructor
	 * @param panels - the individual value heuristic panels to be added to the panel
	 */
	public ValueHeuristicLinkPanel(List<JPanel> panels) {
		setLayout(new BorderLayout());
		
		JPanel topPanel = new JPanel();
		topPanel.setLayout(new FlowLayout());
		for(JPanel current : panels) {
			topPanel.add(current);
		}
		
		JPanel bottomPanel = new JPanel();
		bottomPanel.setLayout(new FlowLayout());
		
		add(topPanel, BorderLayout.NORTH);
		add(bottomPanel, BorderLayout.SOUTH);
		
		setVisible(true);
	}

}
